
<div id="view-content">
	
	<div class="span12">

        
    		<form class="form-horizontal" method="post" action="" name="" onkeydown="if (event.keyCode==13) {$('#forgot_sub').click();return false;}">
        		<h4 class="text-center">找回密码</h4>
        		<div class="progress">
                    <div class="bar <?php if ($this->step == 1):?>bar-success<?php else:?>bar-info<?php endif;?>" style="width: 33%;">输入登陆账号 &raquo;</div>
                    <div class="bar <?php if ($this->step == 2):?>bar-success<?php else:?>bar-info<?php endif;?>" style="width: 34%;">选择找回方式 &raquo;</div>
                    <div class="bar <?php if ($this->step == 3):?>bar-success<?php else:?>bar-info<?php endif;?>" style="width: 33%;">找回密码</div>
                </div>
                <div class="forgot-password">    
                    <?php if ($this->step == 1):?>
                      <div class="control-group">
            		    <label class="control-label" for="inputAccount">账号</label>
            		    <div class="controls">
            		      <input type="text" id="inputAccount" placeholder="用户名/电子邮箱/手机号码" value="" name="loginaccount" tabindex="1">
            		    </div>
            		  </div>
            		    <div class="control-group">
                            <div class="controls">
                                <button class="btn btn-warning" type="button" id="forgot_sub">下一步 &raquo;</button>
                            </div>
                        </div>
            		  <?php endif;?>
            		  
            		  <?php if ($this->step == 2):?>

            		    <h5>请选择任意一种方式找回</h5>
                        <ul class="nav nav-tabs" id="forgot-mode">
                            <li class="<?php if ($this->mode == 1):?>active<?php endif;?>"><a href="<?= $this->url(array('step'=>1,'mode'=>1))?>">使用安全问题</a></li>
                            <li class="<?php if ($this->mode == 2):?>active<?php endif;?>"><a href="<?= $this->url(array('step'=>1,'mode'=>2))?>">使用邮件找回</a></li>
                            <!--li><a href="#phone">使用短信找回</a></li-->
                        </ul>
                         
                        <div class="tab-content">
                            
                            <div class="tab-pane <?php if ($this->mode == 1):?>active<?php endif;?>" id="question">
                            <?php if ($this->m_res[question]):?>
                                <div class="control-group">
                    			    <label for="inputanswer" class="control-label">安全提问</label>
                        			<div class="controls">
                        				<select name="question">
                        				    <?php foreach ($this->question[question_arr] as $value):?>
                        				        <?php if ($value[id] == $this->m_res[question]):?>
                        					        <option value="<?= $value[id]?>"><?= $value[name]?></option>
                        					    <?php endif;?>
                        				    <?php endforeach;?>
                        				</select>
                        			</div>
                    		    </div>
                                <div class="control-group">
                        			<label for="inputanswer" class="control-label">安全回答</label>
                        			<div class="controls">
                        				<input type="text" name="answer" placeholder="请输入您的答案" id="inputanswer" tabindex="1" />
                        			</div>
                        		</div>
                        		
                        	<?php else:?>
                                <h5>您没有设置安全问题, 请通过其他方式找回密码。</h5>
                            <?php endif;?>
                            </div>
                            
                            
                            <div class="tab-pane <?php if ($this->mode == 2):?>active<?php endif;?>" id="email">
                               <?php if ($this->m_res[email]):?>
                              <div class="control-group">
                    		    <label class="control-label" for="inputAccount">电子邮箱</label>
                    		    <div class="controls">
                    		      <input type="text" id="inputAccount" placeholder="电子邮箱" value="" name="forgot_email" tabindex="1">
                    		    </div>
                    		  </div>
                                <?php else:?>
                                    <h5>您没有设置电子邮箱, 请通过其他方式找回密码。</h5>
                                <?php endif;?>
                            </div>
                            
                            <!--div class="tab-pane" id="phone">
                              <div class="control-group">
                    		    <label class="control-label" for="inputAccount">手机号码</label>
                    		    <div class="controls">
                    		      <input type="text" id="inputAccount" placeholder="手机号码" value="" name="email" tabindex="1">
                    		    </div>
                    		  </div>
                            
                            </div-->
                        </div>
                        <?php if (($this->mode == 1 && $this->m_res[question]) || $this->mode == 2):?>
                        <div class="control-group">
                            <div class="controls">
                                <a href="javascript:getCaptcha();" id="captcha" ><img src="/img/loading.gif" title="看不清? 点击换一张" alt="正在生成验证图片" /></a>
                                <p><small><em>*</em> 输入您看到的字符 <a href="javascript:getCaptcha();">[换一张]</a></small></p>
                                <input type="text" name="captcha" value="" placeholder="请输入验证字符" autocomplete="off" tabindex="1" />
                            </div>
                        </div>
                        <div class="control-group">
                            <div class="controls">
                                <button class="btn btn-warning" type="button" id="forgot_sub">下一步 &raquo;</button>
                            </div>
                        </div>
                        <?php endif;?>
                     
            		  <?php endif;?>
            		  
            		  
            		  <?php if ($this->step == 3):?>
            		  
                		  <?php if ($this->error):?>
                		      <h4><?= $this->error?></h4>
                		  <?php else :?>
                              <div class="control-group">
                    		    <label class="control-label" for="inputPassword">新密码</label>
                    		    <div class="controls">
                    		      <input type="password" id="inputPassword" placeholder="新密码" value="" name="password" tabindex="1">
                    		    </div>
                    		  </div>
                    		  <div class="control-group">
                    		    <label class="control-label" for="inputPasswordagain">确认密码</label>
                    		    <div class="controls">
                    		      <input type="password" id="inputPasswordagain" placeholder="确认密码" value="" name="passwordagain" tabindex="1">
                    		    </div>
                    		  </div>
                                <div class="control-group">
                                    <div class="controls">
                                        <button class="btn btn-danger" type="button" id="set_newpw">设置新密码</button>
                                    </div>
                                </div>
                		  <?php endif;?>
            		  <?php endif;?>
        		</div>
        		<input type="hidden" name="mode" value="<?= $this->mode?>" />
        		<input type="hidden" id="ajax" value="" />
        		<input type="hidden" value="<?= $this->step ?>" name="step" />
    		</form>
    		<p class="text-right">
                <i class="icon-question-sign"></i>
                <a href="<?= $this->url(array('controller'=>'member','action'=>'login'),null,true)?>" data-original-title="">还记得账号? 立即登陆</a>
            </p>
    		
    		
    		
    	
	</div>

</div>